<style>
    #hazardExamineAudit-edit .layui-input-block{
        margin-left: 145px;
    }
    #hazardExamineAudit-edit .layui-form-label {
        width: 110px;
    }
</style>
<div class="febs-container" id="hazardExamineAudit-edit">
    <div class="febs-open-body">
        <form class="layui-form" action="" lay-filter="hazardExamineAudit-edit-form">

            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">安全检查信息</blockquote>
                <div class="layui-card-body " id="box-detail">
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail">公司名称：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.tenantName}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">检查类别：</label>
                                <div th:switch="${hazardExamine.examineCategory}">
                                    <div th:case="1" class="layui-input-block layui-input-block-html">日常</div>
                                    <div th:case="2" class="layui-input-block layui-input-block-html">专项</div>
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">检查类型：</label>
                                <div th:switch="${hazardExamine.examineType}">
                                    <div th:case="1" class="layui-input-block layui-input-block-html">公司检查</div>
                                    <div th:case="2" class="layui-input-block layui-input-block-html">部门检查</div>
                                    <div th:case="3" class="layui-input-block layui-input-block-html">车间检查</div>
                                    <div th:case="4" class="layui-input-block layui-input-block-html">班组检查</div>
                                    <div th:case="5" class="layui-input-block layui-input-block-html">项目检查</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail">检查主题：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.examineTitle}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail">开始时间：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.startDate}">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">结束时间：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.endDate}">
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <!--            检查录入信息-->
            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">录入信息</blockquote>
                <div class="layui-card-body " id="box-info">
                    <div class="layui-form-item febs-hide">
                        <label class="layui-form-label">主键：</label>
                        <div class="layui-input-block">
                            <input type="text" name="examineId" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail ">安全检查内容：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.hazardExamineTitle}">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">隐患类型：</label>
                                <div class="layui-input-block layui-input-block-html" name="hazardOperation" id="hazardOperation">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail">隐患等级：</label>
                                <div th:switch="${hazardExamineAudit.hazardLevel}">
                                    <div th:case="1" class="layui-input-block layui-input-block-html">轻微隐患</div>
                                    <div th:case="2" class="layui-input-block layui-input-block-html">一般隐患</div>
                                    <div th:case="3" class="layui-input-block layui-input-block-html">重大隐患</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">项目名称：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.projectName}">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">隐患区域：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.areaName}">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item" th:if="${hazardExamineAudit.rectificationFlg=='0'}">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail">是否整改：</label>
                                <div class="layui-input-block layui-input-block-html">
                                    无需整改
                                </div>
                            </div>
                        </div>
                    </div>

                    <div th:if="${hazardExamineAudit.rectificationFlg=='1'}">
                        <div class="layui-form-item" name="ifShow">
                            <div class="layui-row">
                                <div class="layui-col-xs4">
                                    <label class="layui-form-label layui-form-label-detail">责任人姓名：</label>
                                    <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.leaderName}">
                                    </div>
                                </div>
                                <div class="layui-col-xs4">
                                    <label class="layui-form-label layui-form-label-detail">责任部门：</label>
                                    <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.leaderDeptName}">
                                    </div>
                                </div>
                                <div class="layui-col-xs4">
                                    <label class="layui-form-label layui-form-label-detail">责任人工号：</label>
                                    <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.leaderNo}">
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div class="layui-form-item" name="ifShow">
                            <div class="layui-row">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label layui-form-label-detail ">整改期限：</label>
                                    <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.rectificationDeadline}">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item" name="ifShow">
                            <div class="layui-row">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label layui-form-label-detail ">整改要求：</label>
                                    <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.rectificationRequire}">
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-row">
                                <label class="layui-form-label layui-form-label-detail">问题图片：</label>
                                <div class="layui-input-block">
                                    <div id="fileUploadProblem" style="height: 120px ;width: 100%">
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-row">
                                <div class="layui-col-xs12">
                                    <label class="layui-form-label layui-form-label-detail ">问题描述：</label>
                                    <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.questionDescription}">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail ">检查依据：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.examineEvidence}">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">录入人：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.recordRealName}">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">录入时间：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.recordDate}">
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <!--            整改信息-->
            <div class="layui-card" th:if="${hazardExamineAudit.rectificationFlg=='1'}">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">整改反馈</blockquote>
                <div class="layui-card-body " id="box-rectify">

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail ">整改描述：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.feedbackContent}">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail ">整改图片：</label>
                                <div class="layui-input-block">
                                    <div id="imgView" style="height: 120px ;width: 100%">
                                        <div style="display: flex;flex-wrap: wrap;column-gap: 10px;row-gap: 10px;width: 100%;">
                                            <div id="imgViewBoxRectify" style="display: flex;flex-wrap: wrap;column-gap: 10px;row-gap: 10px;">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">反馈人：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.leaderName}">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">反馈时间：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamineAudit.feedbackDate}">
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <!--            审核记录-->
            <div class="layui-card" th:if="${not #lists.isEmpty(hazardExamineAudit.auditRecordList)}">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">审核记录</blockquote>
                <div class="layui-card-body " id="box-audit-record">

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <label class="layui-form-label layui-form-label-detail">审核记录：</label>
                            <div class="layui-input-block">
                                <div class="jhg-body-table">
                                    <table lay-filter="recordAuditTable" id="recordAuditTable" lay-data="{id: 'recordAuditTable'}"></table>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <!--            审核信息-->
            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">审核信息</blockquote>
                <div class="layui-card-body " id="box-audit">
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label ">审核备注：</label>
                                <div class="layui-input-block">
                                                <textarea type="text" name="auditRemark" autocomplete="off" class="layui-textarea" minlength="2"
                                                          maxlength="800" placeholder="退回时必填审核备注" ></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item febs-hide">
                <button class="layui-btn" lay-submit="" lay-filter="hazardExamineAudit-edit-form-submit" id="submit"></button>
                <button class="layui-btn" lay-submit="" lay-filter="hazardExamineAudit-edit-form-return" id="return"></button>
                <button type="reset" class="layui-btn" id="reset"></button>
            </div>
        </form>
    </div>
</div>
<script data-th-inline="javascript">
    var hazardExamineAuditData = [[${hazardExamineAudit}]];
    var hazardExamineData = [[${hazardExamine}]];
</script>
<script th:src="@{/febs/js/hazard/hazardExamineAudit/hazardExamineAuditEdit.js(v=1)}"></script>